package blog.service.impl;

import blog.common.Result;
import blog.entity.ArticleContent;
import blog.entity.Login;
import blog.mapper.ArticleContentMapper;
import blog.mapper.LoginMapper;
import blog.service.ArticleContentService;
import blog.service.LoginService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jjpzh
 * @since 2023-02-25
 */
@Service
public class ArticleContentServiceImpl extends ServiceImpl<ArticleContentMapper, ArticleContent> implements ArticleContentService {

    @Override
    public Result findArticleContentById(int id) {
        ArticleContent articleContent = baseMapper.selectById(id);
        if (articleContent==null){
            return Result.error("文章不存在");
        }
        return Result.success(articleContent);
    }
}
